
function Confirm-SingleValue {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)][string]$Description,
        [Parameter(Mandatory = $false)][string]$Value,
        [Parameter(Mandatory = $false)][bool]$ConfirmAll = $false
    )

    # Can't use a value that is missing.
    if (($null -eq $Value) -or ($Value -eq '') -or ($Value -eq 'Undefined')) {
        return $false
    }

    if ($ConfirmAll) {
        return $true
    } else {
        # Display value.
        Write-Host # Newline.
        Write-Host "$($Description): $Value"
    
        # Ask user.
        $answer = Read-Host -Prompt "Do you want to use this value? (y/n)"
    
        # Convert answer to boolean.
        return ($answer -iin @('y', 'yes'))
    }
}